{% if field_name in form.errors %}
    <div class="form-group has-error">
{% else %}
    <div class="form-group">
{% endif %}